package com.lotter.api.service;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lotter.common.exception.LotterCusException;
import com.lotter.common.util.StringUtil;
import com.lotter.dao.MobileCodeMapper;


@Service
public class MobileCodeService {
	
	@Autowired
	private MobileCodeMapper mobileCodeMapper;
	
	public boolean whether(String mobile) throws LotterCusException{
		String code  =  null ;
		code  = mobileCodeMapper.findCodeByMobile(mobile, new Date());
		if(StringUtil.isBlank(code)){
			return false ;
		}else{
			return true ;
		}
	}

}
